<template>
	<div>
		<ul class="mui-table-view">
      <li class="mui-table-view-cell mui-media" v-for="item in newslist" :key="item.id">
        <router-link :to="'/home/newinfo/' + item.id">
          <img class="mui-media-object mui-pull-left" :src="item.img_url">
          <div class="mui-media-body">
            <h1>{{ item.title }}</h1>
            <p class='mui-ellipsis'>
              <span>发表时间：{{ item.add_time | dateFormat }}</span>
              <span>点击：{{item.click}}次</span>
            </p>
          </div>
        </router-link>
      </li>
    </ul>
	</div>
</template>

<script>
export default {
	data() {
    return {
      newslist: [
      	{id:1,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:2,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:3,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻2',add_time:new Date().getTime(),click:'10'},
      	{id:4,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻4',add_time:new Date().getTime(),click:'10'},
      	{id:5,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻3',add_time:new Date().getTime(),click:'10'},
      	{id:6,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻6',add_time:new Date().getTime(),click:'10'},
      	{id:7,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻7',add_time:new Date().getTime(),click:'10'},
      	{id:8,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:9,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:10,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:11,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:12,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'},
      	{id:13,img_url:'http://127.0.1.1:3001/src/images/lunbo.jpg',title:'新闻1',add_time:new Date().getTime(),click:'10'}
      ]
    };
  },
  created() {
    
  },
  methods: {
    
  }
}
</script>

<style lang="scss" scoped>
.mui-table-view {
  li {
    h1 {
      font-size: 14px;
    }
    .mui-ellipsis {
      font-size: 12px;
      color: #226aff;
      display: flex;
      justify-content: space-between;
    }
  }
}
</style>